package main

import (
	"example/pkg/db"
	"example/pkg/logger"
	"example/pkg/process"
	"os"
	"os/signal"
)


func main()  {
	r := logger.NewLogger("log/access.log")
	w := db.NewDB("http://192.168.99.100:8086@admin@12345678@mydb@s")
	logProc := process.NewLogProcess(r,w)

	go logProc.Reader.Read(logProc.Rc)
	go logProc.Process()
	go logProc.Writer.Write(logProc.Wc)

	sig := make(chan os.Signal)
	signal.Notify(sig,os.Interrupt)
	<-sig
}
